package com.octopus.kernal.util.xml;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

@XmlType(name="Column")
@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement
public class Column {
	
	@XmlAttribute
	private String type = "String";
	
	@XmlAttribute
	private String list;
	
	@XmlAttribute
	private Integer length = 255;
	
	@XmlAttribute
	private Boolean unique = false;
	
	@XmlAttribute
	private String index;
	
	@XmlAttribute
	private Boolean transience = false;
	
	@XmlElement(name = "ManyToMany")
	private ManyToMany manyToMany;
	
	@XmlElement(name = "OneToMany")
	private OneToMany oneToMany;
	
	@XmlElement(name = "OneToOne")
	private OneToOne oneToOne;
	
	@XmlElement(name = "ManyToOne")
	private ManyToOne manyToOne;
	
	@XmlElement(name = "CollectionOfElements")
	private CollectionOfElements collectionOfElements;

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public Integer getLength() {
		return length;
	}

	public void setLength(Integer length) {
		this.length = length;
	}

	public Boolean getUnique() {
		return unique;
	}

	public void setUnique(Boolean unique) {
		this.unique = unique;
	}

	public String getIndex() {
		return index;
	}

	public void setIndex(String index) {
		this.index = index;
	}

	public ManyToMany getManyToMany() {
		return manyToMany;
	}

	public void setManyToMany(ManyToMany manyToMany) {
		this.manyToMany = manyToMany;
	}

	public String getList() {
		return list;
	}

	public void setList(String list) {
		this.list = list;
	}

	public Boolean getTransience() {
		return transience;
	}

	public void setTransience(Boolean transience) {
		this.transience = transience;
	}

	public CollectionOfElements getCollectionOfElements() {
		return collectionOfElements;
	}

	public void setCollectionOfElements(CollectionOfElements collectionOfElements) {
		this.collectionOfElements = collectionOfElements;
	}

	public OneToMany getOneToMany() {
		return oneToMany;
	}

	public void setOneToMany(OneToMany oneToMany) {
		this.oneToMany = oneToMany;
	}

	public ManyToOne getManyToOne() {
		return manyToOne;
	}

	public void setManyToOne(ManyToOne manyToOne) {
		this.manyToOne = manyToOne;
	}

	public OneToOne getOneToOne() {
		return oneToOne;
	}

	public void setOneToOne(OneToOne oneToOne) {
		this.oneToOne = oneToOne;
	}

}
